<script setup>
import {ref} from "vue";
const counter = ref(0);
const clikeme = () =>{
  counter.value++;
}

const reset = () =>{
  counter.value=0;
}

// const randomNum = () => {
//   counter.value = Math.random();
// }

const randomNum = () => {
  // 例如：生成一个0到99的随机整数
  counter.value = Math.floor(Math.random() * 100);
}

</script>

<template>
  <div class="wapper">
    <button id="me" @click = "clikeme">点击我</button>
    <button id="me" @click = "reset">重置</button>
    <button id="me" @click = "randomNum">随机数</button>
  <label for="me">{{ counter }}</label>
  </div>
  
</template>
<style scoped></style>